#include<iostream>
#include<cstring>
#include<string>
using namespace std;
string hash1[110];
int n, m;
int main()
{
	cin >> n >> m;
	for (int i = 0; i < n; i++) {
		cin >> hash1[i];
	}
	while (m--) {
		string x;
		cin >> x;
		bool flag = 0;
		for (int i = 0; i < n; i++){
			if (x.find(hash1[i]) != -1) {
				flag = 1;
			}
		}
		if (flag) {
			cout << "bieexina" << endl;
		}
		else {
			cout << "enenen" << endl;
		}
	}
	return 0;
}
